<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="layui-v2.6.8/layui/css/layui.css">
    <script src="layui-v2.6.8/layui/layui.js"></script>
    <style>
        .aa{
            margin:0 auto;
        }
    </style>
</head>
<body>
    <div class="layui-carousel aa" id="test1">
        <div carousel-item>
          <div><img src="images/liuyifei.png" alt=""></div>
          <div><img src="images/reba.png" alt=""></div>
          <div><img src="images/yangzi.png" alt=""></div>
         
        </div>
      </div>
      <!-- 条目中可以是任意内容，如：<img src=""> -->
       
    
      <script>
      layui.use('carousel', function(){
        var carousel = layui.carousel;
        //建造实例
        carousel.render({
          elem: '#test1'
          ,width: '370px' //设置容器宽度
          ,height:'450px'
          ,arrow: 'always' //始终显示箭头
        //   ,anim: 'updown' //切换动画方式
        });
      });
      </script>
</body>
</html>